package com.ens.app;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.view.View;
import android.view.View.OnClickListener;

public class PluginChooserActivity extends Activity {

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.pluginchooser_activity);
		final Bundle extras = getIntent().getExtras();

		View filesButton = findViewById(R.id.buttonFilesplugin);
		filesButton.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				Intent i = new Intent(PluginChooserActivity.this,
						FilesPluginActivity.class);
				i.putExtras(extras);
				startActivity(i);
			}
		});

		View passwordsButton = findViewById(R.id.buttonPasswordsplugin);
		passwordsButton.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				Intent i = new Intent(PluginChooserActivity.this,
						PasswordsPluginActivity.class);
				i.putExtras(extras);
				startActivity(i);
			}
		});
		
		View testButton = findViewById(R.id.ButtonTestEncryptionAndDecryption);
		testButton.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				Intent i = new Intent(PluginChooserActivity.this,
						TESTPluginActivity.class);
				i.putExtras(extras);
				startActivity(i);
			}
		});
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.activity_main, menu);
		return true;
	}
}
